package com.shinewind.pojo.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RateDto {
    @ApiModelProperty(value = "用户评分",required = true)
    @DecimalMin(value = "1",message = "评分id最小为1")
    private Double rate;
    @ApiModelProperty(value = "用户id",required = true)
    @NotNull(message = "用户id不能为null")
    @JsonProperty(value = "uId")
    private String uId;
    @ApiModelProperty(value = "商品id",required = true)
    @NotNull(message = "商品id不能为null")
    @JsonProperty(value = "mId")
    private String mId;
}
